CREATE DATABASE Subscriptions
GO

USE Subscriptions
GO

CREATE TABLE Subscriptions(
	id int IDENTITY(1,1) PRIMARY KEY,
	pid int,
	Name nvarchar(max),
	Adress nvarchar(max),
	Format nvarchar(20),
	Parameter1 nvarchar(max),
	Parameter2 nvarchar(max),
	Parameter3 nvarchar(max)
)

ALTER TABLE [dbo].[Subscriptions]  WITH CHECK ADD  CONSTRAINT [FK_pid_id] FOREIGN KEY([pid])
REFERENCES [dbo].[Subscriptions] ([id])
GO